import java.util.List;


public class ArrayAndGeneric<E> {
	public void failedWhenCompiling() {
		// Why generic array creation is illegal - won't compile!
		/*List<String>[] stringLists = new List<String>[1]; 	// (1)
		List<Integer> intList = Arrays.asList(42); 			// (2)
		Object[] objects = stringLists; 					// (3)
		objects[0] = intList; 								// (4)
		String s = stringLists[0].get(0); 					// (5)
*/	}

	public static void main(String[] args) {
		// Fails at runtime!
		Object[] objectArray = new Long[1];
		objectArray[0] = "I don't fit in"; // Throws ArrayStoreException
		
		
	}

}

